﻿@using NewLife.Common;
@{
    Layout = null;
    if (ViewBag.Title == null)
    {
        ViewBag.Title = "登录";
    }

    // 根据空格分隔大小标题
    var dis = SysConfig.Current.DisplayName;
    var title = "";
    var title2 = "";
    var p = dis.IndexOf(" ");
    if (p < 0)
    {
        p = dis.Length > 3 ? 3 : dis.Length;
    }
    title = dis.Substring(0, p).Trim();
    if (p < dis.Length) { title2 = dis.Substring(p).Trim(); }
}
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->

    <title>@ViewBag.Title - @SysConfig.Current.DisplayName</title>
    <link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />

    <!-- 文本字体 -->
    <link rel="stylesheet" href="~/Content/ace/css/ace-fonts.min.css" />
    <!-- ace 样式 -->
    <link rel="stylesheet" href="~/Content/ace/css/ace.min.css" class="ace-main-stylesheet" id="main-ace-style" />

    <!--[if lte IE 9]>
        <link rel="stylesheet" href="~/Content/ace/css/ace-part2.min.css" class="ace-main-stylesheet" />
    <![endif]-->
    <!--[if lte IE 9]>
        <link rel="stylesheet" href="~/Content/ace/css/ace-ie.min.css" />
    <![endif]-->
    <!-- 最后引入基本样式 -->
    <link rel="stylesheet" href="~/Content/bootstrap/css/bootstrap.min.css" />
    <link rel="stylesheet" href="~/Content/bootstrap/css/font-awesome.min.css" />
</head>
<body class="login-layout">
    <div class="main-container">
        <div class="main-content">
            <div class="row">
                <div class="col-sm-10 col-sm-offset-1">
                    <div class="login-container">
                        <div class="center">
                            <h2>
                                <i class="ace-icon fa fa-leaf green"></i>
                                <span class="red">@title</span>
                                <span class="white" id="id-text2">@title2</span>
                            </h2>
                            <h4 class="blue" id="id-company-text">&copy; @SysConfig.Current.Company</h4>
                        </div>

                        <div class="space-6"></div>

                        <div class="position-relative">
                            @Html.Partial("_Login_Login")

                            @Html.Partial("_Login_Forgot")

                            @Html.Partial("_Login_Register")
                        </div><!-- /.position-relative -->

                        <div class="navbar-fixed-top align-right">
                            <br />
                            &nbsp;
                            <a id="btn-login-dark" href="#">暗黑</a>
                            &nbsp;
                            <span class="blue">/</span>
                            &nbsp;
                            <a id="btn-login-blur" href="#">蓝色</a>
                            &nbsp;
                            <span class="blue">/</span>
                            &nbsp;
                            <a id="btn-login-light" href="#">明亮</a>
                            &nbsp; &nbsp; &nbsp;
                        </div>
                    </div>
                </div><!-- /.col -->
            </div><!-- /.row -->
        </div><!-- /.main-content -->
    </div><!-- /.main-container -->
    <!-- JQuery作为一等公民，页面内部随时可能使用 -->
    <script src="~/Content/js/jquery-2.1.3.min.js"></script>
    <!-- 最早引入基本脚本 -->
    <script src="~/Content/bootstrap/js/bootstrap.min.js"></script>
    <script src="~/Content/js/jquery-ui.custom.min.js"></script>
    <script src="~/Content/js/jquery.ui.touch-punch.min.js"></script>

    <!-- HTML5shiv and Respond.js for IE8 to support HTML5 elements and media queries -->
    <!--[if lte IE 8]>
    <script src="~/Content/js/html5shiv.min.js"></script>
    <script src="~/Content/js/respond.min.js"></script>
    <![endif]-->
    <!-- inline scripts related to this page -->
    <script type="text/javascript">
        jQuery(function ($) {
            $(document).on('click', '.toolbar a[data-target]', function (e) {
                e.preventDefault();
                var target = $(this).data('target');
                $('.widget-box.visible').removeClass('visible');//hide others
                $(target).addClass('visible');//show target
            });
        });



        //you don't need this, just used for changing background
        jQuery(function ($) {
            $('#btn-login-dark').on('click', function (e) {
                $('body').attr('class', 'login-layout');
                $('#id-text2').attr('class', 'white');
                $('#id-company-text').attr('class', 'blue');

                e.preventDefault();
            });
            $('#btn-login-light').on('click', function (e) {
                $('body').attr('class', 'login-layout light-login');
                $('#id-text2').attr('class', 'grey');
                $('#id-company-text').attr('class', 'blue');

                e.preventDefault();
            });
            $('#btn-login-blur').on('click', function (e) {
                $('body').attr('class', 'login-layout blur-login');
                $('#id-text2').attr('class', 'white');
                $('#id-company-text').attr('class', 'light-blue');

                e.preventDefault();
            });

        });
    </script>
</body>
</html>